package cn.jxau.fukin.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "/diary")
public class DiaryController {

	@RequestMapping(value = "/showDiaryPage.do")
	public String showDiaryPage(HttpServletRequest request) {
		String flag = (String) request.getSession().getAttribute("flag");
		if (flag != null) {

			return "forward:/WEB-INF/jsp/diary.jsp";
		} else {
			return "forward:/user/showLoginPage.do";

		}
	}
}
